package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Phone    string `gorm:"type:char(11)" json:"phone"`
	Password string `gorm:"type:varchar(32)" json:"password"`
	Username string `gorm:"type:varchar(20)" json:"username"`
}

func (u *User) VeryUser(db *gorm.DB, id int) error {
	return db.Debug().Where("id =?", id).First(&u).Error
}
